home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group98c.txt / 000118_icon-group-sender _Thu Dec 10 09:06:07 1998.msg < prev    next >
Internet Message Format  |  2000-09-20  |  3KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id JAA06264
  4.     for icon-group-addresses; Thu, 10 Dec 1998 09:04:38 -0700 (MST)
  5. Message-Id: <199812101604.JAA06264@baskerville.CS.Arizona.EDU>
  6. From: swampler@noao.edu (Steve Wampler)
  7. Date: Tue, 8 Dec 1998 18:22:21 MST
  8. To: icon-group@optima.CS.Arizona.EDU
  9. Subject: Re: Past Keyword / Coexpr Help
  10. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  11. Status: RO
  12.  
  13. On Dec 8 at  5:23pm, MJE writes:
  14. } Steve Wampler wrote:
  15. } > 
  16. } > ...  You still
  17. } > have the overhead of procedure calling - there is no difference in the
  18. } > call to a user-supplied procedure and a built-in.
  19. } The logical requirements are identical but I'm sure you'll grant that C
  20. } overhead happens much faster than Icon interpreted overhead.
  21.  
  22. Well, yes and no.  It's the interpreter making the call in both cases,
  23. so argument pushing, stack adjustments, etc.  are the same.  Only after
  24. the call stack has been set up does a difference appear and that's
  25. not much more than setting the program counter.  Once you're in the
  26. C routine, things will go faster, but there are still all the type
  27. checks and type coercions that take place, plus the decomposition
  28. of Icon types into C types and back.  All of these happen in either
  29. case.  The amount of work done differently (i.e. in C instead of
  30. Icon) isn't that large of a percentage of the total work being done.
  31.  
  32. Don't be surprised if there isn't that much difference - the
  33. 'heart' of the code (find()) is coded in C either way.  Still, it
  34. would make a good experiment and I'll certainly grant that if you
  35. implemented find() in Icon versus calling the C you'd see a
  36. difference.
  37.  
  38. } I like your idea about an IPL pack.  However, you have not incited me to
  39. } commit an act of implementation.  What interests me instead is making
  40. } Icon parsing available in C language programs.
  41.  
  42. } For that I will need to write a bunch of COM objects.  That means
  43. } "Component Object Model" for those not in the know, Microsoft's upgrade
  44. } to the DLL concept.  I have been mulling over this project for a while. 
  45. } A little more mulling, and I might be incited to commit an act of
  46. } implementation.
  47.  
  48. That will be interesting and certainly useful for those of you running
  49. under Windows, but not much use to those of us who live in the non-MS
  50. world.
  51.  
  52. One thing to keep in mind is that in many Icon programs, the
  53. time spent in the interpreter is <10% of the total running time - most
  54. of the time is actually spent in C code.  We learned that when Cary
  55. Coutant wrote a compiler for Icon back in the 70's - the speed up
  56. wasn't spectacular.  It took Ken Walker's optimizing compiler work
  57. to show any significant improvement and even with that there was
  58. still a lot of work to be done.
  59.  
  60.  
  61. -- 
  62. Steve Wampler - swampler@gemini.edu [Gemini 8m Telescopes Project (under AURA)]
  63. The gods that smiled at your birth are now laughing openly. (Fortune Cookie)
  64.